package xin.mashibo.pattern.singleton;

/**
 * Singleton设计模式
 *
 * @author MaShibo
 * 日期 :  2019/1/22
 */
public class Singleton {

    private static Singleton singleton = new Singleton();

    private Singleton() {
        System.out.println("生成了一个实例");
    }

    public static Singleton getInstance() {
        return singleton;
    }
}
